<template>
  <div id="app">
    <h2>测试题</h2>
   <SubJect  @tj="huoqu"></SubJect>
    <div>
      <FlagItem :appindex="appindex"></FlagItem>
    </div>
   <p :value="applist">1{{ applist }}</p>
   <p :value="applist">1{{ appindex }}</p>
  </div>
 
</template>

<script>
import FlagItem from './components/FlagItem.vue';
import SubJect from './components/SubJect.vue';



export default {
  data(){
    return{
      applist:[],
      appindex:[]
    }
  },
  components: {
    SubJect,
    FlagItem
  },
  methods:{
    huoqu(t1){
      this.applist=''
      this.applist=t1
      console.log(this.applist)
    }
  },
  watch:{
    immdiate:true,
    applist(){
      this.appindex=this.applist
    }
  }
 
};
</script>

<style>
body {
  background-color: #eee;
}

#app {
  background-color: #fff;
  width: 500px;
  margin: 50px auto;
  box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.5);
  padding: 2em;
}
</style>